package com.xdtech.sys.util;

import org.apache.shiro.SecurityUtils;

import com.xdtech.sys.vo.UserItem;

public class SessionContextUtil {
	
	public static UserItem getCurrentUser() {
		try {
			UserItem currentUser = (UserItem) SecurityUtils.getSubject().getSession().getAttribute(SysConstants.CURRENT_USER);
			return currentUser;
		} catch (Exception e) {
			e.printStackTrace();
		}
		
		return null;
	}

}
